﻿<UserControl x:Class="SharpTalk.Client.WpfApplication.Controls.TextBoxButton"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:Controls="clr-namespace:SharpTalk.Client.WpfApplication.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="43" d:DesignWidth="273"
             BorderThickness="0"
             BorderBrush="{x:Null}">

    <Border Margin="2" CornerRadius="{Binding RelativeSource={RelativeSource AncestorType=Controls:TextBoxButton}, Path=InsideBorderCornerRadius}" BorderThickness="{Binding InsideBorderThickness, RelativeSource={RelativeSource AncestorType=Controls:TextBoxButton}}" BorderBrush="{Binding InsideBorderBrush,RelativeSource={RelativeSource AncestorType=Controls:TextBoxButton}}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBox x:Name="textBox" TextWrapping="Wrap" AcceptsReturn="True" ToolTip="{Binding TextBoxToolTip,RelativeSource={RelativeSource AncestorType=Controls:TextBoxButton}}" VerticalAlignment="Center" BorderThickness="0" Grid.Column="0" Text="{Binding Text, RelativeSource={RelativeSource AncestorType=Controls:TextBoxButton}}" />
            <Button Style="{StaticResource FlatButtonStyle}" Margin="0,1,2,1" Grid.Column="1" MinHeight="23" HorizontalAlignment="Right" ToolTip="{Binding ButtonToolTip,RelativeSource={RelativeSource AncestorType=Controls:TextBoxButton}}" Command="{Binding ButtonCommand,RelativeSource={RelativeSource AncestorType=Controls:TextBoxButton}}" CommandParameter="{Binding Text,RelativeSource={RelativeSource AncestorType=Controls:TextBoxButton}}" Content="{Binding ButtonContent, RelativeSource={RelativeSource AncestorType=Controls:TextBoxButton}}" />
        </Grid>
    </Border>
</UserControl>
